package cn.bs.busuo.account.controller;

import cn.bs.busuo.account.pojo.entity.SightsSeasons;
import cn.bs.busuo.account.pojo.param.SightSeason;
import cn.bs.busuo.account.service.ISightsSeasonsService;
import cn.bs.busuo.common.web.JsonResult;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "2.新增季节景点")
@RequestMapping("/season")
public class SightsSeasonsController {
    @Autowired
    private ISightsSeasonsService sightsSeasonsService;

    @ApiOperationSupport(order = 100)
    @ApiOperation("新增")
    @PostMapping("insert")
    public JsonResult insert(SightSeason sightSeason) {
        sightsSeasonsService.addSeason(sightSeason);
        return JsonResult.ok();
    }

    @ApiOperationSupport(order = 200)
    @ApiOperation("删除")
    @PostMapping("delect")
    public JsonResult delect(Long id) {
        sightsSeasonsService.delectSeason(id);
        return JsonResult.ok();
    }
}
